var pointMapTest = (function () {

  var pointMapTest = {};

  var pointMap$1 = {
    首页: {
      百度: [[22, 2180, 220, 2296], 1080, 2340],
      视频: [[220, 2180, 418, 2296], 1080, 2340],
      任务: [[440, 2180, 638, 2296], 1080, 2340],
      // 任务: [[440, 2240, 638, 2356], 1080, 2340],
      小说: [[660, 2180, 858, 2296], 1080, 2340],
      我的: [[858, 2180, 1056, 2296], 1080, 2340],
    },
    我的: {
      设置: [[984, 127, 1036, 179], 1080, 2340],
    },
    任务: {
      微信提现关闭: [[847, 599, 885, 638], 1080, 2340],
    },
  };

  var clickUtils$1 = {
    getRateX(x, w) {
      return parseInt(x * (device.width / (w || device.width)));
    },
    getRateY(y, h) {
      return parseInt(y * (device.height / (h || device.height)));
    },
    clickXY(x, y) {
      var showing = console.showing;
      if (showing) {
        console.hide();
        sleep(0.1 * 1000);
      }
      click(x, y);
      if (showing) {
        console.show();
      }
    },
    clickXYZW(x, y, z, w, deltaX, deltaY) {
      deltaX = deltaX || 1;
      deltaY = deltaY || 1;
      this.clickXY(
        random(x + deltaX, z - deltaX),
        random(y + deltaY, w - deltaY)
      );
    },
    clickBounds(bounds, deltaX, deltaY) {
      var left = bounds.left;
      var right = bounds.right;
      var top = bounds.top;
      var bottom = bounds.bottom;
      this.clickXYZW(left, top, right, bottom, deltaX, deltaY);
    },
    clickPointMap(pointMap, deltaX, deltaY) {
      var point = pointMap[0];
      var width = pointMap[1];
      var height = pointMap[2];
      var x = this.getRateX(point[0], width);
      var y = this.getRateY(point[1], height);
      var z = this.getRateX(point[2], width);
      var w = this.getRateY(point[3], height);
      this.clickXYZW(x, y, z, w, deltaX, deltaY);
    },
    clickTextUI(TextUI, deltaX, deltaY) {
      this.clickBounds(TextUI.bounds(), deltaX, deltaY);
    },
    clickTextOCR(TextOCR, deltaX, deltaY) {
      this.clickBounds(TextOCR.bounds, deltaX, deltaY);
    },
  };

  var pointMap = pointMap$1;
  var clickUtils = clickUtils$1;

  clickUtils.clickPointMap(pointMap.首页.任务);

  return pointMapTest;

})();
